home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
comm
/
thor
/
PEInstaller.lha
/
ProcessEvents13.install
next >
Wrap
Text File
|
1996-11-19
|
18KB
|
411 lines
; ProcessEvents.br V1.3 Installer ©1996 Roy E Brown
; $VER: ProcessEvents.install 1.3.1 (19.11.96)
;*****************************************************************************************
(set #vers "V1.3")
(set #lf "\n")
(run "SetEnv THOR/THORPATH \"`GetEnv THOR/THORPATH`*N\"")
(set #ThorPath (getenv "Thor/ThorPath"))
(set #ThorPath (substr #Thorpath 0 (- (strlen #ThorPath) 1)))
(set #RealPath (expandpath #ThorPath))
(set @default-dest (cat #realpath "/rexx/bbsread"))
(set #docpath (cat #RealPath "/docs"))
(if (exists "Env:Thor" (noreq)) (message (cat "\n"
"Welcome to ProcessEvents "#vers" for Thor.\n\n"
"This script will install ProcessEvents "#vers
" into your\n\n "@default-dest" directory.\n\n"
"It will then help you to create the\n"
"required ProcessEvents configuration file.\n\n"
"Please read the 'Help' comments with each option.\n\n"
"© 1996 Roy E Brown")
)
( (message (cat "\nYou do not have Thor V2.4 "
"installed.\nProcessEvents is of no use to you.\n\n"
"Thor\n© 1993-1995 Ultima Thule Software"))
(exit (quiet))
)
)
(set #oldfile (tackon @default-dest "ProcessEvents.br"))
(set #vernum (getversion #oldfile))
(set #ver (/ #vernum 65536))
(set #rev (- #vernum (* #ver 65536)))
(set #version (+ (* 10 #ver) #rev))
;**** START OF GET-CONFIGURATION PROCEDURE ***********************************************
(procedure P_Configure
(set #con (askbool (prompt (cat "\n"
"In order to use ProcessEvents.br "#vers", we need\n"
"to create a configuration file. By entering\n"
"the correct details during this installation\n"
"process, the configuration file will created\n"
"and stored in the ENVARC:Thor directory\n\n"
"Do you wish to continue?")
)
(help "")
(choices "Configure" "Exit")
)
)
(if (= #con 0) (exit (quiet)) (set #nop "nop"))
(set #SystemName (askstring (prompt "\nPlease enter the name of your TCP system in Thor\n"
"e.g. 'Internet', 'Demon', 'Kevin' etc.\n")
(help (cat "This is the name of your TCP system as configured "
"when setting up Thor using the System Configuration "
"option. Examples:\n\n"
" 'Internet' \n"
" 'Demon' \n"
" 'Bloggs' \n\n"
"or whatever wierd and wonderful name you have thought "
"of to call your TCP system.")
)
(default "Internet")
)
)
(set #MT (askchoice (prompt "\nPlease select your type of mail system.\n")
(help (cat "This is the type of Mail system that you use with your ISP. "
"The options are either POP3 or SMTP.\n\n"
"'Demon Internet Services' users should set this to SMTP unless "
"they are paying Demon extra to have a POP3 mailbox.\n\n"
"Users of other ISPs should consult with their provider if they "
"are not sure which system they are using.")
)
(choices "SMTP" "POP3")
)
)
(set #MailType (select #MT "SMTP" "POP3"))
(select #MT (set #MF (askstring (prompt (cat "\n"
"Please enter your mailbox filename \n"
"This must be the same as you entered\n"
"in the Thor TCP Systems config. \n\n"
"The default is the variable Env:USER\n")
)
(help (cat "This is the is the name of the file created when you receive "
"new mail.\n\nIt is normally located in UUMAIL: which is normally "
"assigned when you run your 'Startnet' script.\n\n It should also "
"be the same as you have set in the 'mailpacket' entry in the "
"Thor Systems Configuration")
)
(default (getenv "USER"))
)
)
(set #MF "")
)
(select #MT (set #MB (askdir (prompt "Please confirm the location of your mail download directory. "
"It is usually assigned as \"UUMAIL:\"\n")
(help (cat "This is the directory assigned by your 'Startnet' script.\n\n"
"It is normally \"AmiTCP:usr/mail/\"")
)
(default "UUMAIL:")
)
)
(set #MB "")
)
(set #MailBox (cat #MB #MF))
(set #Maxtries (asknumber (prompt "\nPlease enter the number of times you wish\n"
"ProcessEvents to retry to collect mail and news")
(help (cat "This is the number of times you want GetTCP and SendTCP to "
"attempt to connect with your mail/news servers.\n\n"
"If the servers are busy, ProcessEvents will keep trying to "
"connect for the number of times that you set in this variable.")
)
(range 1 100)
(default 5)
)
)
(set #AP (askchoice (prompt "\nDo you want ProcessEvents to automatically parse\n"
"new news and mail when collection is complete?\n")
(help (cat "This will allow the user to decide whether to parse any new mail "
"and/or news articles automatically once collection is complete - regardless "
"of the \'LogOff\' variable setting.")
)
(choices "Autoparse" "Do not Autoparse")
)
)
(set #Autoparse (select #AP "YES" "NO"))
(set #LO (askchoice (prompt (cat "\nDo you want ProcessEvents to display the 'Log Off (Y/N)'\n"
"requester once everything is complete?\n\n"
"Please read the 'Help' comments.\n")
)
(help "If set to 'Log Off Requester' then ProcessEvents will display a "
"requestor offering the option of whether to link down or not.\n\n"
"NOTE: If you set this to 'Log Off Requester', you will still have to manually "
"link down using the requester buttons. This variable only decides "
"if you see the requester or not.\n\n"
"If set to 'No Log Off Requester', then no requester will be shown and "
"you will remain on-line.")
(choices "No Log Off Requester" "Log Off Requester")
)
)
(set #LogOff (select #LO "NO" "YES"))
(set #LinkDown (askstring (prompt (cat "\nEnter the command that you use to 'link down'\n"
"i.e. to disconnect from your ISP. If necessary, include "
"the full pathname.\n")
)
(help (cat "This is your link down command or script. You should specify the "
"full command line that takes your system off-line.\n\n"
"Example: 'rx AmiTCP:bin/Link Down'\n"
" 'rx \"address MIAMI.1 OFFLINE\"'")
)
(default "rx \"address MIAMI.1 OFFLINE\"")
)
)
(set #ED (askchoice (prompt "Select your desired text editor")
(help (cat"You should select your favourite EXTERNAL text editor here.\n\n"
"This will be used should you wish to edit an Event prior to sending it.\n\n"
"Both GoldED and CygnusEd have the 'STICKY' option attached. GoldED certainly needs "
"it, but I am not sure about CygnusEd.\n\nThis script assumes that you are using the "
"fast starters ('Ed') for GoldED and CygnusEd'.\n\nOf course, should you use a different "
"editor, then select 'Other' and you will be able to enter your choice of text editor.")
)
(choices "GoldED" "CygnusEd" "Other")
)
)
(set #Editor (select #ED "C:ED STICKY" "CED -keepio"
(askfile (prompt "\nPlease select your external text editor\n")
(help (cat "Enter the name of your desired text editor, "
"including the full path if necessary. You may also need "
"a 'STICKY' type option to prevent a direct return to "
"ProcessEvents once called.")
(default "c:")
)
)
)
)
(set #ST (askchoice (prompt "Select your desired text viewer")
(help (cat "You should selet your favourite text viewer here. This will enable "
"you to view any mail or newsgroup Event prior to sending.\n\nIf your viewer is "
"not listed, select 'Other' and you will be able to select your favourite text viewer")
)
(choices "MuchMore" "More" "Other")
)
)
(set #ShowText (select #ST "c:MuchMore" "c:More"
(askfile (prompt "\nPlease select your external text viewer")
(help (cat "Enter the name of your desired text viewer, including "
"the full path if necessary.")
(default "C:")
)
)
)
)
(if (= #MailBox "") (set #MM "(Determined by main script)") (set #MM #MailBox))
(set #check (askbool (prompt (cat "\n"
"Please check that you have entered\n"
"all details correctly.\n\n"
"Your Thor system = "#SystemName"\n"
"Your Mailtype = "#MailType"\n"
"Your Mailbox = "#MM"\n"
"Maxtries = "#Maxtries"\n"
"Autoparse = "#Autoparse"\n"
"LogOff = "#LogOff"\n"
"LinkDown = "#LinkDown"\n"
"EDITOR = "#Editor"\n"
"ShowText = "#ShowText)
)
(help "")
(default 1)
(choices "All Correct" "Start Again")
)
)
(select #check (P_Configure)
(set #NOP "NOP")
)
(textfile (prompt "")
(help "")
(dest "T:ProcessEvents.temp")
(append "*** ProcessEvents Configuration File ***" #lf
"CmdPath " #RealPath #lf
"SystemName " #SystemName #lf
"MailType " #Mailtype #lf
"MailBox " #Mailbox #lf
"MaxTries " #Maxtries #lf
"AutoParse " #Autoparse #lf
"LogOff " #LogOff #lf
"LinkDown " #Linkdown #lf
"Editor " #Editor #lf
"ShowText " #ShowText #lf
"** END **" #lf #lf
"Please DO NOT alter this file by hand")
)
(set #configdir "ENVARC:Thor")
(set #configfile (tackon #configdir "ProcessEvents.config"))
(set #oldconfig (cat #configfile ".old"))
(if (exists #configfile (noreq))( (set #old (cat "\n"
"(Your old configuration file has been\n"
"renamed with the .old extension)\n"
"The ProcessEvents.br configuration file\n"
"will now be copied to:\n\n"#configdir"\n")
)
(rename #configfile #oldconfig (prompt "")
(help "")
)
)
( (set #old (cat "\n"
"The ProcessEvents.br configuration file\n"
"will now be copied to:\n\n"#configdir"\n")
)
)
)
(copyfiles (prompt #old)
(help "")
(source "T:ProcessEvents.temp")
(dest #configdir)
(newname "ProcessEvents.config")
(confirm)
(nogauge)
)
(delete "T:ProcessEvents.temp")
; **** Everything is done - let's end it here and now ****
(exit (cat "\n\nInstallation Complete\n\nProcessEvents has been installed in\n\n"
@default-dest
"\n\nIMPORTANT!\n\n"
"PLEASE RE-BOOT before using ProcessEvents "#vers".\n\n"
"All Copyrights are acknowledged") (quiet ))
)
; **** END OF GET CONFIGURATION PROCEDURE **********************************************
; **** PROCEDURES USED FOR COPYING CORRECT FILES ****
(procedure P_CopyBoth
(copyfiles (source "ProcessEvents13.br")
(dest @default-dest)
(newname "ProcessEvents.br")
(nogauge)
)
(copyfiles (source "ProcessEvents.guide")
(dest #docpath)
(infos)
(nogauge)
)
)
(procedure P_CopyPE
(copyfiles (source "ProcessEvents13.br")
(dest @default-dest)
(newname "ProcessEvents.br")
(nogauge)
)
)
(procedure P_CopyGuide
(copyfiles (source "ProcessEvents.guide")
(dest #docpath)
(infos)
(nogauge)
)
)
; **** END OF COPYING PROCEDURES ************************************************
; ***** Note to author: Change number on next line if version number changes *****
(trap 4 (set #SZ (getsum (cat @default-dest "/ProcessEvents.br"))))
(if (= #SZ -924007754) ( (set #UP(askbool (prompt "\nYou already have ProcessEvents Version "#vers" installed.\n\n"
"Do you wish to update the\nProcessEvents.br Configuration file?")
(help "")
(choices "Update" "Exit")
)
)
(if (= #UP 0) (exit (quiet)) (P_Configure))
)
( (if (= #SZ 0) (set #cont (askbool
(prompt "\nYou do not have ProcessEvents installed.\n\n"
"Do you wish to continue and install\nProcessEvents "#vers"?")
(help "")
)
)
(set #cont (askbool (prompt ("\nYou currently have ProcessEvents Version %ld.%ld installed.\n\n" #ver #rev)
"Do you wish to continue and update to Version "#vers"?\n\n"
"(If you are updating from V1.0 or V1.1, Please complete "
"the full installation process - there are "
"minor changes to the configuration file.)\n")
(help "")
)
)
)
)
)
(if (= #cont 0) (exit (quiet)) (welcome))
; **** Rename old file and copy new file to correct directory. ****
(set #fileold (cat #oldfile ".old"))
(if (exists #oldfile (noreq)) (rename #oldfile #fileold
(prompt (cat ("\nRename\n\n ProcessEvents.br V%ld.%ld\n\n" #ver #rev)
"to\n\nProcessEvents.br.old.\n\n"
"If you skip this part, your current\nfile will be overwritten.")
)
(help "")
(confirm)
)
(set #nop "nop")
)
;**** Ask user which files to copy ****
(set #copy (askoptions (prompt "\nThe Installer will now copy the following files to the correct locations. "
"Please see 'Help' for details.\n")
(help "\n ProcessEvents.br will be copied to\n\n "@default-dest"\n\n"
"\n ProcessEvents.guide will be copied to\n\n "#docpath)
(choices "ProcessEvents.br" "ProcessEvents.guide")
)
)
(set #Proc (select #copy "" (P_CopyPE)(P_CopyGuide)(P_CopyBoth)))
;**** Call the correct copying procedure ****
(#Proc)
; **** Let's get all the details we need for the configuration file.****
(P_Configure)